package com.shi.yibanjia.annotation;

import com.shi.yibanjia.enums.AuthCodeEnum;
import com.shi.yibanjia.enums.LogicalEnum;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(value = RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Auth {

    boolean requireAuth() default true;

    AuthCodeEnum[] hasPerm() default AuthCodeEnum.NO_NEED_PERM;

    LogicalEnum logical() default LogicalEnum.OR;
}
